<!--

Saherace - Rent a Car

This page is shown if a user is not logged in and wants to rate
the cars he has rent. 

-->

<!-- Include the soap client connection and the header area of the website -->
<?php include('includes/header.php'); ?>
	
	<?php
	
	//If login form was posted
	if(isset($_GET['login'])) {
		$_SESSION['login'] = $_GET['login'];
		
		//If login wasnt successful
		if($_SESSION['login'] == 'false') {
			echo '<div style="color: red;">Kundennummer oder Passwort falsch.</div>';
		}
	}
	
	if (isset($_SESSION['login'])) {
		//if login was successful
		if($_SESSION['login'] == 'true') {
			echo '<script>'.
					'window.location.replace("rate.php"); '.
				 '</script>';
			exit;
		}
	}
	?>
	
	
	<!-- Show form to insert login data -->
	<form action="rate.php" method="POST">
		<input type="hidden" name="type" value="login"/>
		<input type="hidden" name="login" value="false"/>
		<ul data-role="listview" data-inset="true">
			<li data-role="list-divider">Login</li>
			<li>
				<table>
					<tr>
						<td><label for="customer_id">Kunden-Nr.:</label></td>
						<td><input type="number" id="customer_id" name="customer_id" data-mini="true"/></td>
					</tr>
					<tr>
						<td><label for="customer_pwd">Passwort:</label></td>
						<td><input type="password" id="customer_pwd" name="customer_pwd" data-mini="true"/></td>
					</tr>
				</table>							
			</li>
		</ul>	
		<input type="submit" value="Login" data-icon="arrow-r" data-iconpos="right" />	
	</form>

<!-- Include the footer area of the website -->
<?php include('includes/footer.php'); ?>
